package com.zyz.friend.model.exam.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;

@Getter
@Setter
@ToString
public class ExamVO {

    @JsonSerialize(using = ToStringSerializer.class)  // 传递给前端序列化
    @JsonDeserialize(using = NumberDeserializers.LongDeserializer.class)  // 后端接收反序列化
    private Long examId;

    private String title;  // 竞赛标题

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;  // 竞赛开始时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;  // 竞赛结束时间

    private boolean enter = false; // 是否报名


}
